﻿<%@ Page Title="" Language="C#" MasterPageFile="~/System/System.master" AutoEventWireup="true"
    CodeFile="ApproveMembers.aspx.cs" Inherits="System_ApproveMembers" StylesheetTheme="Content" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <ul class="topmenu">
        <li>单位：<asp:DropDownList ID="DepartmentList" runat="server" AutoPostBack="True" DataTextField="ShortName"
            DataValueField="DepartmentID" AppendDataBoundItems="True" OnSelectedIndexChanged="DepartmentList_SelectedIndexChanged"
            Width="65px">
        </asp:DropDownList>
            <asp:DropDownList ID="UnitList" runat="server" DataTextField="FullName" DataValueField="DepartmentID"
                AppendDataBoundItems="True" AutoPostBack="True" OnSelectedIndexChanged="UnitList_SelectedIndexChanged">
            </asp:DropDownList>
            系统人员：<asp:DropDownList ID="ddlMembers" runat="server" DataTextField="UserName" DataValueField="UserID">
            </asp:DropDownList>
        </li>
        <li>
            <asp:LinkButton runat="server" ID="lkbAdd" OnClick="lkbAdd_Click">添加人员</asp:LinkButton></li>
    </ul>
    <div class="prompt">
        <asp:Label ID="Prompt" runat="server"></asp:Label></div>
    <asp:GridView ID="UserGrid" runat="server" AutoGenerateColumns="False" Caption="<span>人员列表</span>"
        DataKeyNames="UserID" OnRowDataBound="UserGrid_RowDataBound" OnRowCommand="UserGrid_RowCommand">
        <Columns>
            <asp:TemplateField>
                <ItemStyle HorizontalAlign="Center" />
                <HeaderStyle Width="30px" />
                <ItemTemplate>
                    <asp:Label ID="ID" runat="server" ForeColor="#666666"></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:BoundField DataField="UserID" HeaderText="人员编码">
                <HeaderStyle Width="68px" />
            </asp:BoundField>
            <asp:BoundField DataField="UserName" HeaderText="姓名">
                <HeaderStyle Width="120px" />
            </asp:BoundField>
            <asp:TemplateField HeaderText="单位">
                <ItemTemplate>
                    <%# GetDepartmentName(Eval("DepartmentID").ToString()) %>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:BoundField DataField="TimeRegister" DataFormatString="{0:D}" HeaderText="注册时间" />
            <asp:BoundField DataField="TimeLastLogin" HeaderText="上次登录时间" />
            <asp:TemplateField HeaderText="操作">
                <ItemTemplate>
                    <asp:LinkButton runat="server" ID="Delete" CommandArgument='<%# Eval("UserID") %>'
                        CommandName="del" OnClientClick="return confirm('是否真的删除?')">删除</asp:LinkButton>
                </ItemTemplate>
            </asp:TemplateField>
        </Columns>
        <HeaderStyle HorizontalAlign="Left" />
        <RowStyle HorizontalAlign="Left" />
    </asp:GridView>
</asp:Content>
